<?php

/**
 * InsAtelier form base class.
 *
 * @method InsAtelier getObject() Returns the current form's model object
 *
 * @package    tfe
 * @subpackage form
 * @author     3emeIG
 * @version    SVN: $Id: sfDoctrineFormGeneratedInheritanceTemplate.php 24171 2009-11-19 16:37:50Z Kris.Wallsmith $
 */
abstract class BaseInsAtelierForm extends InscriptionForm
{
  protected function setupInheritance()
  {
    parent::setupInheritance();

    $this->widgetSchema   ['saison'] = new sfWidgetFormChoice(array('choices' => array('2007-2008' => '2007-2008', '2008-2009' => '2008-2009', '2009-2010' => '2009-2010', '2010-2011' => '2010-2011', '2012-2013' => '2012-2013', '2014-2015' => '2014-2015', '2015-2016' => '2015-2016', '2016-2017' => '2016-2017', '2018-2019' => '2018-2019', '2019-2020' => '2019-2020')));
    $this->validatorSchema['saison'] = new sfValidatorChoice(array('choices' => array(0 => '2007-2008', 1 => '2008-2009', 2 => '2009-2010', 3 => '2010-2011', 4 => '2012-2013', 5 => '2014-2015', 6 => '2015-2016', 7 => '2016-2017', 8 => '2018-2019', 9 => '2019-2020'), 'required' => false));

    $this->widgetSchema   ['id_atelier'] = new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Atelier'), 'add_empty' => false));
    $this->validatorSchema['id_atelier'] = new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('Atelier')));

    $this->widgetSchema   ['paiement_en_deux_fois'] = new sfWidgetFormChoice(array('choices' => array('non' => 'non', 'oui' => 'oui')));
    $this->validatorSchema['paiement_en_deux_fois'] = new sfValidatorChoice(array('choices' => array(0 => 'non', 1 => 'oui')));

    $this->widgetSchema   ['mode_de_paiement_second_semestre'] = new sfWidgetFormChoice(array('choices' => array('' => '', 'liquide' => 'liquide', 'virement' => 'virement', 'carte' => 'carte', 'chèque' => 'chèque')));
    $this->validatorSchema['mode_de_paiement_second_semestre'] = new sfValidatorChoice(array('choices' => array(0 => '', 1 => 'liquide', 2 => 'virement', 3 => 'carte', 4 => 'chèque'), 'required' => false));

    $this->widgetSchema   ['date_de_paiement_second_semestre'] = new sfWidgetFormDate();
    $this->validatorSchema['date_de_paiement_second_semestre'] = new sfValidatorDate(array('required' => false));

    $this->widgetSchema   ['code_de_paiement_second_semestre'] = new sfWidgetFormInputText();
    $this->validatorSchema['code_de_paiement_second_semestre'] = new sfValidatorString(array('max_length' => 10, 'required' => false));

    $this->widgetSchema->setNameFormat('ins_atelier[%s]');
  }

  public function getModelName()
  {
    return 'InsAtelier';
  }

}
